<template>
  <el-container>
    <el-main>
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="情景产品信息" name="prod">
          <data-situation-analysis-prod-info ref="prod" />
        </el-tab-pane>
        <el-tab-pane label="情景资产信息" name="assest">
          <data-situation-analysis-assest-info ref="assest" />
        </el-tab-pane>
        <el-tab-pane label="情景缺口分析" name="lack">
          <data-situation-lack-analysis ref="lack" />
        </el-tab-pane>
      </el-tabs>
    </el-main>
  </el-container>
</template>

<script>
  import dataSituationAnalysisAssestInfo from '@/views/page/M8/report/asetDebtManager/liquidityRisk/situationAnalysis/dataSituationAnalysis/dataSituationAnalysisAssestInfo'
  import dataSituationAnalysisProdInfo from '@/views/page/M8/report/asetDebtManager/liquidityRisk/situationAnalysis/dataSituationAnalysis/dataSituationAnalysisProdInfo'
  import dataSituationLackAnalysis from '@/views/page/M8/report/asetDebtManager/liquidityRisk/situationAnalysis/dataSituationAnalysis/dataSituationLackAnalysis'

  export default {
    components: {
      dataSituationAnalysisProdInfo, dataSituationLackAnalysis, dataSituationAnalysisAssestInfo
    },
    data() {
      return {
        activeName: 'prod'
      }
    },
    activated() {
      this.activeName = 'prod'
      this.$refs[this.activeName].init()
    },
    methods: {
      handleClick(tab, event) {
        this.$refs[tab.name].init()
      }
    }
  }
</script>
